<html>
<head>
<title>closeable window</title>
</head>
<body>
This window can be closed by clicking on <a id="close" onclick="window.setTimeout(function() { window.close();}, 0);" href="#">this</a>.
</body>
</html>